package org.viva.alibaba.aliyun.oss;

import org.viva.core.Log;
import org.viva.service.sys.WebsiteCache;

public class OSSClientProperties {

    public static String  bucketName = "";
    public static boolean useStatus  = false;
    public static String  key        = "";
    public static String  secret     = "";
    public static String  endPoint   = "";

    public static void init() {
        useStatus = "true".equals(WebsiteCache.get("aliyun.oss.useStatus")) ? true : false;
        bucketName = WebsiteCache.get("aliyun.oss.bucketName");
        key = WebsiteCache.get("aliyun.oss.key");
        secret = WebsiteCache.get("aliyun.oss.secret");
        endPoint = WebsiteCache.get("aliyun.oss.endPoint");
        Log.info("init aliyun oss success");
    }

    static {
        init();
    }

}
